import '@/App.css';
import ChatWindow from '@/pages/ChatWindow';
import { useStores } from '@/stores/hooks';
import { roadDarkAlgorithm, roadLightAlgorithm } from '@/utils/theme';
import { ConfigProvider } from 'antd';
import { observer } from 'mobx-react';

const App = observer(() => {
  const { chatStores } = useStores();
  return (
    <ConfigProvider
      theme={{
        algorithm:
          chatStores?.theme === 'light'
            ? roadLightAlgorithm
            : roadDarkAlgorithm,
      }}
    >
      <div className='App'>
        <ChatWindow />
      </div>
    </ConfigProvider>
  );
});

export default App;
